package cn.lixin.hrm;

import cn.lixin.hrm.client.CourseTypeFeignClient;
import cn.lixin.hrm.doc.CourseDoc;
import cn.lixin.hrm.query.CourseDocQuery;
import cn.lixin.hrm.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
   /*
@Component
public class CourseTypeFallBackFactory implements FallbackFactory<CourseTypeFeignClient> {
    @Override
    public CourseTypeFeignClient create(Throwable throwable) {
       return new CourseTypeFeignClient() {

          @Override
            public AjaxResult addCourseDoc(CourseDoc courseDoc) {
                return AjaxResult.me().setSuccess(false).setMessage("课程上线失败，es库出现异常");
            }
          @Override
            public AjaxResult delCourseDoc(Long id) {
                return AjaxResult.me().setSuccess(false).setMessage("课程下线失败，es库出现异常");
            }

            @Override
            public AjaxResult searchQuery(CourseDocQuery docQuery) {
                return AjaxResult.me().setSuccess(false).setMessage("服务异常，未找到相关数据");
            }

        };

    }
}
*/